home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_22_1988_Transactor_Publishing.d64 / handy hexer (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  303b  |  13 lines

  1. 1 rem hex print routine. entry points:
  2. 2 rem   line 10, 4 digit hex value
  3. 3 rem   line 30, 2 digit with $
  4. 4 rem   line 40, 2 digit without $
  5. 5 rem put value to print in 'a'
  6. 6 :
  7. 10 b=int(a/256):gosub 30
  8. 20 b=a-b*256:gosub 40:return
  9. 30 print "$";
  10. 40 x=int(b/16):gosub 50:x=b-x*16
  11. 50 printmid$("0123456789abcdef",x+1,1);
  12. 60 return
  13.